/**
 * <copyright>
 *
 * Copyright (c) 2011 Zeligsoft (2009) Limited
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors: 
 *   Zeligsoft (2009) Limited - Initial API and implementation
 *
 * </copyright>
 *
 */
package org.omg.deployment;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Plan Locality Kind</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see org.omg.deployment.DeploymentPackage#getPlanLocalityKind()
 * @model extendedMetaData="name='PlanLocalityKind'"
 * @generated
 */
public enum PlanLocalityKind implements Enumerator {
	/**
	 * The '<em><b>Same Process</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #SAME_PROCESS_VALUE
	 * @generated
	 * @ordered
	 */
	SAME_PROCESS(0, "SameProcess", "SameProcess"),

	/**
	 * The '<em><b>Different Process</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #DIFFERENT_PROCESS_VALUE
	 * @generated
	 * @ordered
	 */
	DIFFERENT_PROCESS(1, "DifferentProcess", "DifferentProcess"),

	/**
	 * The '<em><b>No Constraint</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #NO_CONSTRAINT_VALUE
	 * @generated
	 * @ordered
	 */
	NO_CONSTRAINT(2, "NoConstraint", "NoConstraint");

	/**
	 * The '<em><b>Same Process</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Same Process</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #SAME_PROCESS
	 * @model name="SameProcess"
	 * @generated
	 * @ordered
	 */
	public static final int SAME_PROCESS_VALUE = 0;

	/**
	 * The '<em><b>Different Process</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Different Process</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #DIFFERENT_PROCESS
	 * @model name="DifferentProcess"
	 * @generated
	 * @ordered
	 */
	public static final int DIFFERENT_PROCESS_VALUE = 1;

	/**
	 * The '<em><b>No Constraint</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>No Constraint</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #NO_CONSTRAINT
	 * @model name="NoConstraint"
	 * @generated
	 * @ordered
	 */
	public static final int NO_CONSTRAINT_VALUE = 2;

	/**
	 * An array of all the '<em><b>Plan Locality Kind</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final PlanLocalityKind[] VALUES_ARRAY = new PlanLocalityKind[] {
			SAME_PROCESS, DIFFERENT_PROCESS, NO_CONSTRAINT, };

	/**
	 * A public read-only list of all the '<em><b>Plan Locality Kind</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<PlanLocalityKind> VALUES = Collections
			.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Plan Locality Kind</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static PlanLocalityKind get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			PlanLocalityKind result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Plan Locality Kind</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static PlanLocalityKind getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			PlanLocalityKind result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Plan Locality Kind</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static PlanLocalityKind get(int value) {
		switch (value) {
		case SAME_PROCESS_VALUE:
			return SAME_PROCESS;
		case DIFFERENT_PROCESS_VALUE:
			return DIFFERENT_PROCESS;
		case NO_CONSTRAINT_VALUE:
			return NO_CONSTRAINT;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private PlanLocalityKind(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
		return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
		return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
		return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}

} //PlanLocalityKind
